package com.sj.stone.domain.oracle.entry;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author ChenGuop
 * @ClassName: OrderItem
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @date 2016年7月4日 下午2:47:16
 */

@Entity
@Table(name = "ASS_ORDER")
public class Order implements Serializable {
    private static final long serialVersionUID = 1L;

    public static enum PayStatus {
        NON("0", "未付款"), PAID("1", "已付款"), REF("2", "待退款"), REFED("3", "已退款"), REFUSED("4", "卖家拒绝退款");

        private String name;
        private String value;

        PayStatus(String value, String name) {
            this.value = value;
            this.name = name;

        }

        public String getValue() {
            return value;
        }

        public String getName() {
            return name;
        }
    }

    public static enum PayMent {
        ONLINE("0", "网上支付"), HDFK("1", "货到付款"), POS("2", "POS");

        private String name;
        private String value;

        PayMent(String value, String name) {
            this.value = value;
            this.name = name;

        }

        public String getValue() {
            return value;
        }

        public String getName() {
            return name;
        }
    }

    public static enum ShipStatus {
        NONSHIP("0", "未发货"), SHIPPED("1", "已发货"), ARRIVED("2", "已送达(地包)"), RECEIVED("3", "已收货"), RED("4", "待退货"), RETED("5", "已退货"), REFUSED("6", "卖家拒绝退货"), DENIED("7", "买家拒签");

        private String name;
        private String value;

        ShipStatus(String value, String name) {
            this.value = value;
            this.name = name;

        }

        public String getValue() {
            return value;
        }

        public String getName() {
            return name;
        }
    }

    public static enum Status {
        NORMAL("0", "正常"), UNCHECKED("1", "未审核"), CHECKED("2", "已审核"), CANCEL("3", "取消"), INVALID("4", "无效");

        private String name;
        private String value;

        Status(String value, String name) {
            this.value = value;
            this.name = name;

        }

        public String getValue() {
            return value;
        }

        public String getName() {
            return name;
        }
    }

    @Id
    private String id;
    @Column(name = "MEMBER_ID")
    private String memberId;
    private String orderNum;

    private Date createTime;

    @Enumerated(EnumType.ORDINAL)
    private ShipStatus shipStatus;

    private Float amount;

    private PayMent payMent;

    private String dealType;

    @Enumerated(EnumType.ORDINAL)
    private Status status;

    @Enumerated(EnumType.ORDINAL)
    private PayStatus payStatus;

    private Float actualPayNum;
    private String walletNum;

    private String address;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }


    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getShipStatus() {
        return shipStatus.getName();
    }

    public void setShipStatus(ShipStatus shipStatus) {
        this.shipStatus = shipStatus;
    }

    public String getStatus() {
        return status.getName();
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    public Float getAmount() {
        return amount;
    }

    public void setAmount(Float amount) {
        this.amount = amount;
    }

    public String getPayMent() {
        return payMent.getName();
    }

    public void setPayMent(PayMent payMent) {
        this.payMent = payMent;
    }

    public String getDealType() {
        return dealType;
    }

    public void setDealType(String dealType) {
        this.dealType = dealType;
    }

    public String getPayStatus() {
        return payStatus.getName();
    }

    public void setPayStatus(PayStatus payStatus) {
        this.payStatus = payStatus;
    }

    public Float getActualPayNum() {
        return actualPayNum;
    }

    public void setActualPayNum(Float actualPayNum) {
        this.actualPayNum = actualPayNum;
    }

    public String getWalletNum() {
        return walletNum;
    }

    public void setWalletNum(String walletNum) {
        this.walletNum = walletNum;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
